/*
 * Copyright 2018 NingWei (ningww1@126.com)
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * </p>
 */
package com.kingdee.shr.ques.cloud.poi.entity;

/**
 * @author NingWei
 */
public class ErrorEntity {
    private Integer sheetIndex;
    private Integer rowIndex;
    private Integer cellIndex;
    private String cellValue;
    private String columnName;
    private String errorMessage;

    private ErrorEntity(Builder builder) {
        setSheetIndex(builder.sheetIndex);
        setRowIndex(builder.rowIndex);
        setCellIndex(builder.cellIndex);
        setCellValue(builder.cellValue);
        setColumnName(builder.columnName);
        setErrorMessage(builder.errorMessage);
    }

    public static Builder builder() {
        return new Builder();
    }

    public Integer getSheetIndex() {
        return sheetIndex;
    }

    public void setSheetIndex(Integer sheetIndex) {
        this.sheetIndex = sheetIndex;
    }

    public Integer getRowIndex() {
        return rowIndex;
    }

    public void setRowIndex(Integer rowIndex) {
        this.rowIndex = rowIndex;
    }

    public Integer getCellIndex() {
        return cellIndex;
    }

    public void setCellIndex(Integer cellIndex) {
        this.cellIndex = cellIndex;
    }

    public String getCellValue() {
        return cellValue;
    }

    public void setCellValue(String cellValue) {
        this.cellValue = cellValue;
    }

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }


    public static final class Builder {
        private Integer sheetIndex;
        private Integer rowIndex;
        private Integer cellIndex;
        private String cellValue;
        private String columnName;
        private String errorMessage;

        private Builder() {
        }

        public Builder sheetIndex(Integer val) {
            sheetIndex = val;
            return this;
        }

        public Builder rowIndex(Integer val) {
            rowIndex = val;
            return this;
        }

        public Builder cellIndex(Integer val) {
            cellIndex = val;
            return this;
        }

        public Builder cellValue(String val) {
            cellValue = val;
            return this;
        }

        public Builder columnName(String val) {
            columnName = val;
            return this;
        }

        public Builder errorMessage(String val) {
            errorMessage = val;
            return this;
        }

        public ErrorEntity build() {
            return new ErrorEntity(this);
        }
    }
}
